Ext.define('Admin.view.permission.PermissionAddShowForm', {
    extend: 'Ext.form.Panel',
    alias: 'widget.permissionAddShowForm',
    requires: [
    ],
    viewModel: {type: 'permissionViewModel'},
    controller: 'permissionViewController',
    //cls: '',

    layout: {
        type:'vbox',
        align:'stretch'
    },

    bodyPadding: 10,
    scrollable: true,

    defaults: {
        labelWidth: 60,
        labelSeparator: ''
    },

    items: [{
        xtype: 'hidden',//hidden
        fieldLabel: 'id',
        name:'permissionId',
        readOnly:true
    },{
        xtype: 'textfield',
        fieldLabel: '权限名称',
        name:'permissionName'
    }, {
        xtype:'radiogroup',
        fieldLabel: '权限类型',
        style: 'padding-top:3px;height:17px;',
        items: [{ name: 'permissionType', inputValue: '操作权限', boxLabel: '操作权限', checked: true }]
        }, {
        xtype: 'textfield',
        fieldLabel: '权限url',
        name:'url'
    }],

    bbar: {
        overflowHandler: 'menu',
        items: ['->',{
            xtype: 'button',
            ui: 'soft-green',
            text: '提交',
            handler : 'submitEditForm'
        },{
            xtype: 'button',
            ui: 'soft-red',
            text: '取消',
          handler :function(bt){
            var win = bt.up('window');
            if (win) {
                win.close();
            }
          }
        },'->']
    }
});